﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;
using System.Data.SqlClient;
using System.Web.Configuration;
/// <summary>
/// Summary description for DatabaseInteraction
/// </summary>
public class DatabaseInteraction
{
    public static SqlConnection GetConnection()
    {
        string sqlConnection = WebConfigurationManager.ConnectionStrings["NorthwindConnectionString"].ToString();
        SqlConnection cnn = null;
        try
        {
            cnn = new SqlConnection(sqlConnection);
        }
        catch (Exception ex)
        {
            Console.WriteLine(ex.Message);
            return null;
        }

        return cnn;
    }

    public static string SelectProduct = "select * from Products";

}